#include <iostream>
#include <string>
using namespace std;

#include "Newlineup.h"
#include "Event.h"

Newlineup::Newlineup() : Event()
{
//placeholder
}

Newlineup::Newlineup(string type, Time t) :Event (type, t)
{
//placeholder
}

Newlineup::Newlineup(Time t,int playernumbers[5]) :Event( "NL", t)
{
//adds the defualt player numbers
	for (int i=1;i<6;i++)
	{
	currentPlayerNumbers.push_back(i);
	}


}



bool Newlineup::assignValues()
{
bool checkInput=true;
currentPlayerNumbers.clear();
int somePlayerNumber;
m_eventType="NL";
cin>>m_eventTime;
m_eventTime.reverseTime();
cin>>m_team;
	for (int i=0; i<5; i++)
	{
	cin>>somePlayerNumber;
		if ((somePlayerNumber< 100) && (somePlayerNumber >0 ))
		{
		currentPlayerNumbers.push_back(somePlayerNumber);
		}
		else
		checkInput=false;
	}

	if(!m_eventTime.checkTimeInput())
	{
	checkInput=false;
	}	
	if((m_team!='H')&&(m_team!='h')&&(m_team!='A')&&(m_team!='a'))
	{
	checkInput=false;
	} 

return checkInput;

}


